<@_tagList advanced=true name=name typeId=typeId orderField=orderField orderType=orderType pageIndex=pageNum count=numPerPage>
<div class="pageHeader">
    <form class="pagerForm" onsubmit="return navTabSearch(this);" method="post">
        <#include "../include_page/parameters.html"/>
        <div class="searchBar">
            <ul class="searchContent">
                <li>
                    <label><@t.page 'name'/>:</label>
                    <input type="text" name="name" value="${(name)!}" />
                </li>
                <li>
                    <label><@t.page 'tag_type'/>:</label>
                    <#if typeId?has_content><@_tagType id=typeId><#assign tagTypeName=object.name/></@_tagType></#if>
                    <input type="hidden" name="typeId" value="${typeId!}" />
                    <input class="readonly" readonly="readonly" name="tagTypeName" type="text" size="10" value="${(tagTypeName)!}"/>
                    <a class="btnLook" href="cmsTagType/lookup.html?typeId=${typeId!}" width="920" lookupGroup=""><@t.page 'tag_type.select'/></a>
                </li>
            </ul>
            <div class="subBar">
                <ul>
                    <li>
                        <button type="submit" class="buttonActive"><@t.page 'button.search'/></button>
                    </li>
                </ul>
            </div>
        </div>
    </form>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <li><a href="cmsTag/add.html" target="navTab" rel="cmsTag/add"><i class="icon-plus-sign-alt icon-large"></i> <@t.page 'tag.add'/></a></li>
            <li><a href="cmsTag/add.html?id={sid}" target="navTab" rel="cmsTag/edit"><i class="icon-edit icon-large"></i> <@t.page 'tag.edit'/></a></li>
            <li><a href="cmsTag/delete.do?_csrf=<@_csrfToken admin=true/>" title="<@t.page 'confirm.batch_delete'/>" target="selectedTodo" rel="ids"><i class="icon-trash icon-large"></i> <@t.page 'button.batch_delete'/></a></li>
        </ul>
    </div>
    <table class="list" width="100%" layoutH="99">
        <thead>
            <tr>
                <th width="20"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
                <th width="30"><@t.page 'id'/></th>
                <th><@t.page 'name'/></th>
                <th><@t.page 'tag_type'/></th>
                <th orderField="searchCount" class="<#if orderField??&&'searchCount'==orderField><#if 'asc'=orderType>asc<#else>desc</#if><#else>order</#if>"><@t.page 'tag.search_count'/></th>
                <th><@t.page 'operate'/></th>
            </tr>
        </thead>
        <tbody>
            <#list page.list as a>
                <@t.merge 'typeIds' a.typeId!/>
            </#list>

            <@_tagType ids=t.typeIds!><#assign typeMap=map!/></@_tagType>
            <#list page.list as a>
            <tr target="sid" rel="${a.id}">
                <td><input name="ids" value="${a.id}" type="checkbox"></td>
                <td>${a.id}</td>
                <td>${(a.name)!}</td>
                <td>${(typeMap[a.typeId?string].name)!}</td>
                <td>${a.searchCount!}</td>
                <td>
                    <a href="cmsTag/add.html?id=${a.id}" target="navTab" rel="cmsTag/edit" icon="<i class='icon-edit icon-large'></i>" title="<@t.page 'tag.edit'/>"><@t.page 'button.edit'/></a>|
                    <a href="cmsTag/delete.do?ids=${a.id}&_csrf=<@_csrfToken admin=true/>" title="<@t.page 'confirm.delete'/>" callback="$('tr[rel=${a.id}]',navTab.getCurrentPanel()).remove()" target="ajaxTodo"><@t.page 'button.delete'/></a>
                </td>
            </tr>
            </#list>
        </tbody>
    </table>
    <#include "../include_page/page.html"/>
</div>
</@_tagList>